<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>C MIP-SDK: mip_sdk_base.c File Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">C MIP-SDK
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">mip_sdk_base.c File Reference</div>  </div>
</div>
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="mip__sdk__base_8h_source.html">mip_sdk_base.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="mip__sdk__user__functions_8h_source.html">mip_sdk_user_functions.h</a>&quot;</code><br/>
</div><table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">u16&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mip__sdk__base_8c.html#a6a16dddaf7cf73726c973a214a08b0e9">mip_base_cmd_ping</a> (<a class="el" href="struct__mip__interface.html">mip_interface</a> *device_interface)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">u16&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mip__sdk__base_8c.html#acd13d2cbe5c4f53beb3d8383b0121a2e">mip_base_cmd_idle</a> (<a class="el" href="struct__mip__interface.html">mip_interface</a> *device_interface)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">u16&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mip__sdk__base_8c.html#a4f5f257cf2122bd84858545fa065ed36">mip_base_cmd_get_device_info</a> (<a class="el" href="struct__mip__interface.html">mip_interface</a> *device_interface, <a class="el" href="struct__base__device__info__field.html">base_device_info_field</a> *device_info)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">u16&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mip__sdk__base_8c.html#ab8834fea90e0f72aa125d94e3f82f019">mip_base_cmd_get_device_supported_descriptors</a> (<a class="el" href="struct__mip__interface.html">mip_interface</a> *device_interface, u8 *response_buffer, u16 *response_size)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">u16&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mip__sdk__base_8c.html#ac7472af591013b43f17a8efcfc22dfb1">mip_base_cmd_built_in_test</a> (<a class="el" href="struct__mip__interface.html">mip_interface</a> *device_interface, u32 *bit_result)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">u16&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mip__sdk__base_8c.html#a2e62aaa38cc37952d08741f933cee489">mip_base_cmd_resume</a> (<a class="el" href="struct__mip__interface.html">mip_interface</a> *device_interface)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">u16&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mip__sdk__base_8c.html#a823c12fdfee59a6f0ca8179857acc944">mip_base_cmd_reset_device</a> (<a class="el" href="struct__mip__interface.html">mip_interface</a> *device_interface)</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><dl class="author"><dt><b>Author:</b></dt><dd>Nathan Miller </dd></dl>
<dl class="version"><dt><b>Version:</b></dt><dd>1.1 </dd></dl>
</div><hr/><h2>Function Documentation</h2>
<a class="anchor" id="ac7472af591013b43f17a8efcfc22dfb1"></a><!-- doxytag: member="mip_sdk_base.c::mip_base_cmd_built_in_test" ref="ac7472af591013b43f17a8efcfc22dfb1" args="(mip_interface *device_interface, u32 *bit_result)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u16 mip_base_cmd_built_in_test </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct__mip__interface.html">mip_interface</a> *&#160;</td>
          <td class="paramname"><em>device_interface</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32 *&#160;</td>
          <td class="paramname"><em>bit_result</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<h2><a class="anchor" id="DESCRIPTION"></a>
DESCRIPTION</h2>
<p>Perform the device's built-in test. </p>
<h2><a class="anchor" id="DETAILS"></a>
DETAILS</h2>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">mip_interface</td><td>*device_interface - The device interface. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">u32</td><td>*bit_result - The returned bitfield result. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Return values:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">MIP_INTERFACE_ERROR</td><td>When there is a problem with the command format or the<br/>
 the device communications failed.<br/>
 </td></tr>
    <tr><td class="paramname">MIP_INTERFACE_OK</td><td>The command was successful.<br/>
 </td></tr>
  </table>
  </dd>
</dl>
<h2><a class="anchor" id="NOTES"></a>
NOTES</h2>
<p>Please consult the device DCP for descriptions of BIT result values.<br/>
 A value of 0x00000000 is always success, other values indicate an error. </p>

</div>
</div>
<a class="anchor" id="a4f5f257cf2122bd84858545fa065ed36"></a><!-- doxytag: member="mip_sdk_base.c::mip_base_cmd_get_device_info" ref="a4f5f257cf2122bd84858545fa065ed36" args="(mip_interface *device_interface, base_device_info_field *device_info)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u16 mip_base_cmd_get_device_info </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct__mip__interface.html">mip_interface</a> *&#160;</td>
          <td class="paramname"><em>device_interface</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct__base__device__info__field.html">base_device_info_field</a> *&#160;</td>
          <td class="paramname"><em>device_info</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<h2><a class="anchor" id="DESCRIPTION"></a>
DESCRIPTION</h2>
<p>Get the device information structure. </p>
<h2><a class="anchor" id="DETAILS"></a>
DETAILS</h2>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">mip_interface</td><td>*device_interface - The device interface. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">base_device_info_field</td><td>*device_info - The returned device info structure. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Return values:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">MIP_INTERFACE_ERROR</td><td>When there is a problem with the command format or the<br/>
 the device communications failed.<br/>
 </td></tr>
    <tr><td class="paramname">MIP_INTERFACE_OK</td><td>The command was successful.<br/>
 </td></tr>
  </table>
  </dd>
</dl>
<h2><a class="anchor" id="NOTES"></a>
NOTES</h2>
<p>None </p>

</div>
</div>
<a class="anchor" id="ab8834fea90e0f72aa125d94e3f82f019"></a><!-- doxytag: member="mip_sdk_base.c::mip_base_cmd_get_device_supported_descriptors" ref="ab8834fea90e0f72aa125d94e3f82f019" args="(mip_interface *device_interface, u8 *response_buffer, u16 *response_size)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u16 mip_base_cmd_get_device_supported_descriptors </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct__mip__interface.html">mip_interface</a> *&#160;</td>
          <td class="paramname"><em>device_interface</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>response_buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16 *&#160;</td>
          <td class="paramname"><em>response_size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<h2><a class="anchor" id="DESCRIPTION"></a>
DESCRIPTION</h2>
<p>Get the descriptors supported by the device. </p>
<h2><a class="anchor" id="DETAILS"></a>
DETAILS</h2>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">mip_interface</td><td>*device_interface - The device interface. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">u8</td><td>*response_buffer - The returned array of descriptors. </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">u16</td><td>*response_size - On entry, the size of the buffer; On exit, the size of the data returned. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Return values:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">MIP_INTERFACE_ERROR</td><td>When there is a problem with the command format or the<br/>
 the device communications failed.<br/>
 </td></tr>
    <tr><td class="paramname">MIP_INTERFACE_OK</td><td>The command was successful.<br/>
 </td></tr>
  </table>
  </dd>
</dl>
<h2><a class="anchor" id="NOTES"></a>
NOTES</h2>
<p>The provided buffer should be large enough to hold the maximum number of<br/>
 supported descriptors from any device (currently 126.) This would be a<br/>
 buffer of at least 252 bytes. The returned descriptors are in the format<br/>
 of u16 = [descriptor set (MSB), descriptor (LSB)]. </p>

</div>
</div>
<a class="anchor" id="acd13d2cbe5c4f53beb3d8383b0121a2e"></a><!-- doxytag: member="mip_sdk_base.c::mip_base_cmd_idle" ref="acd13d2cbe5c4f53beb3d8383b0121a2e" args="(mip_interface *device_interface)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u16 mip_base_cmd_idle </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct__mip__interface.html">mip_interface</a> *&#160;</td>
          <td class="paramname"><em>device_interface</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<h2><a class="anchor" id="DESCRIPTION"></a>
DESCRIPTION</h2>
<p>Put the device in idle mode. </p>
<h2><a class="anchor" id="DETAILS"></a>
DETAILS</h2>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">mip_interface</td><td>*device_interface - The device interface. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Return values:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">MIP_INTERFACE_ERROR</td><td>When there is a problem with the command format or the<br/>
 the device communications failed.<br/>
 </td></tr>
    <tr><td class="paramname">MIP_INTERFACE_OK</td><td>The command was successful.<br/>
 </td></tr>
  </table>
  </dd>
</dl>
<h2><a class="anchor" id="NOTES"></a>
NOTES</h2>
<p>None </p>

</div>
</div>
<a class="anchor" id="a6a16dddaf7cf73726c973a214a08b0e9"></a><!-- doxytag: member="mip_sdk_base.c::mip_base_cmd_ping" ref="a6a16dddaf7cf73726c973a214a08b0e9" args="(mip_interface *device_interface)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u16 mip_base_cmd_ping </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct__mip__interface.html">mip_interface</a> *&#160;</td>
          <td class="paramname"><em>device_interface</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<h2><a class="anchor" id="DESCRIPTION"></a>
DESCRIPTION</h2>
<p>Ping the device. </p>
<h2><a class="anchor" id="DETAILS"></a>
DETAILS</h2>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">mip_interface</td><td>*device_interface - The device interface. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Return values:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">MIP_INTERFACE_ERROR</td><td>When there is a problem with the command format or the<br/>
 the device communications failed.<br/>
 </td></tr>
    <tr><td class="paramname">MIP_INTERFACE_OK</td><td>The command was successful.<br/>
 </td></tr>
  </table>
  </dd>
</dl>
<h2><a class="anchor" id="NOTES"></a>
NOTES</h2>
<p>None </p>

</div>
</div>
<a class="anchor" id="a823c12fdfee59a6f0ca8179857acc944"></a><!-- doxytag: member="mip_sdk_base.c::mip_base_cmd_reset_device" ref="a823c12fdfee59a6f0ca8179857acc944" args="(mip_interface *device_interface)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u16 mip_base_cmd_reset_device </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct__mip__interface.html">mip_interface</a> *&#160;</td>
          <td class="paramname"><em>device_interface</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<h2><a class="anchor" id="DESCRIPTION"></a>
DESCRIPTION</h2>
<p>Reset the attached device. </p>
<h2><a class="anchor" id="DETAILS"></a>
DETAILS</h2>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">mip_interface</td><td>*device_interface - The device interface. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Return values:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">MIP_INTERFACE_ERROR</td><td>When there is a problem with the command format or the<br/>
 the device communications failed.<br/>
 </td></tr>
    <tr><td class="paramname">MIP_INTERFACE_OK</td><td>The command was successful.<br/>
 </td></tr>
  </table>
  </dd>
</dl>
<h2><a class="anchor" id="NOTES"></a>
NOTES</h2>
<p>If communicating via USB, it is important to close the port immediately after<br/>
 calling this function. Failure to do so may result in the designated port<br/>
 hanging. </p>

</div>
</div>
<a class="anchor" id="a2e62aaa38cc37952d08741f933cee489"></a><!-- doxytag: member="mip_sdk_base.c::mip_base_cmd_resume" ref="a2e62aaa38cc37952d08741f933cee489" args="(mip_interface *device_interface)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u16 mip_base_cmd_resume </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct__mip__interface.html">mip_interface</a> *&#160;</td>
          <td class="paramname"><em>device_interface</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<h2><a class="anchor" id="DESCRIPTION"></a>
DESCRIPTION</h2>
<p>Resume any enabled continuous data streams. This is the reverse of <code>idle</code>. </p>
<h2><a class="anchor" id="DETAILS"></a>
DETAILS</h2>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">mip_interface</td><td>*device_interface - The device interface. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Return values:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">MIP_INTERFACE_ERROR</td><td>When there is a problem with the command format or the<br/>
 the device communications failed.<br/>
 </td></tr>
    <tr><td class="paramname">MIP_INTERFACE_OK</td><td>The command was successful.<br/>
 </td></tr>
  </table>
  </dd>
</dl>
<h2><a class="anchor" id="NOTES"></a>
NOTES</h2>
<p>None </p>

</div>
</div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Fri May 30 2014 17:03:33 for C MIP-SDK by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
